// Decompiled by GOOSIN CO,LTD Copyright 2010 Pavel Kouznetsov.
// home page: http://www.Goosin.net
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   query_ok.java

package hr.engage.interview;

import include.nseer_cookie.exchange;
import include.nseer_db.nseer_db_backup1;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.*;
import javax.servlet.jsp.JspFactory;

public class query_ok extends HttpServlet
{

	ServletContext application;
	HttpSession session;

	public query_ok()
	{
	}

	public synchronized void service(HttpServletRequest request, HttpServletResponse response)
		throws IOException, ServletException
	{
		HttpSession dbSession = request.getSession();
		JspFactory _jspxFactory = JspFactory.getDefaultFactory();
		javax.servlet.jsp.PageContext pageContext = _jspxFactory.getPageContext(this, request, response, "", true, 8192, true);
		ServletContext dbApplication = dbSession.getServletContext();
		try
		{
			nseer_db_backup1 hr_db = new nseer_db_backup1(dbApplication);
			if (hr_db.conn((String)dbSession.getAttribute("unit_db_name")))
			{
				HttpSession session = request.getSession();
				PrintWriter out = response.getWriter();
				String details_number = request.getParameter("details_number");
				String bodyc = new String(request.getParameter("remark").getBytes("UTF-8"), "UTF-8");
				String remark = exchange.toHtml(bodyc);
				try
				{
					if (hr_db.conn((String)dbSession.getAttribute("unit_db_name")))
					{
						String sql1 = (new StringBuilder("update hr_resume set interview_tag='4',remark='")).append(remark).append("' where details_number='").append(details_number).append("'").toString();
						hr_db.executeUpdate(sql1);
						hr_db.commit();
						hr_db.close();
						response.sendRedirect("hr/engage/interview/query_ok_a.jsp");
					} else
					{
						response.sendRedirect("error_conn.htm");
					}
				}
				catch (Exception ex)
				{
					out.println((new StringBuilder("error")).append(ex).toString());
				}
			} else
			{
				response.sendRedirect("error_conn.htm");
			}
		}
		catch (Exception exception) { }
	}
}
